<?php

/* 
 * Author: Mario Jose
 * email:  mariognu-free@yahoo.com.br
 *
 * created: 12 October 2007
 * modified: July, 25th 2009
*/

/*
  This script is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This script is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

function txt2html($text)
   {
   // remove special end chars
   $cleanText = str_replace("\n", "", str_replace("\r", "", $text));
   // translate text to html format
   $htmlText = htmlentities($cleanText);
   return $htmlText;
   } //end function

function showText ($nameVar, $index)
   {
   echo txt2html ($nameVar[$index]);
   }
   
?>